package com.jiantong.work.enums;

/**
 * Created by niufei on 2017/3/20.
 *
 */
public enum BreedReportStatus {
    NO_LICENSE(-3,"不发证"),
    REJECT(-2,"驳回"),
    DISAPPROVE(-1,"不受理"),

    UNCOMMITTED(0,"未提交"),
    STAY_APPROVE(1,"待受理"),
    SURVEYED(2,"已受理"),
    STAY_LICENSE(3,"已勘察"),
    HAS_LICENSE(4,"已发证");

    private final Integer value;
    private final String description;

    BreedReportStatus(Integer value, String description){
        this.value = value;
        this.description = description;
    }

    public static BreedReportStatus from(Integer value) {
        for (BreedReportStatus breedReportStatus : BreedReportStatus.values()) {
            if (breedReportStatus.value == value) {
                return breedReportStatus;
            }
        }
        return null;
    }

    public Integer value() {
        return this.value;
    }

    @Override
    public String toString() {
        return description;
    }
}
